package com.victor.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.victor.dao.JingquActivityDao;
import com.victor.entity.JQActiviClassone;
import com.victor.entity.JQActiviClasstwo;
import com.victor.entity.JQActivity;
import com.victor.entity.JQActivityTime;
import com.victor.service.JingquActivityService;

@Service
public class JingquActivityServiceImpl implements JingquActivityService {

	@Autowired
	private JingquActivityDao dao;

	// 获取第一分类
	@Override
	public List<JQActiviClassone> getClassOne() {
		return dao.getClassOne();
	}

	// 获取第二分类
	@Override
	public List<JQActiviClasstwo> getClassTwo(String classoneid) {
		return dao.getClassTwo(classoneid);
	}

	// 获取景区活动列表(景区id)
	@Override
	public List<JQActivity> getJQactivity(String jqid) {
		return dao.getJQactivity(jqid);
	}

	// 新建景区活动
	@Override
	public boolean buildJQactivity(JQActivity jqActivity) {
		return dao.buildJQactivity(jqActivity) > 0 ? true : false;
	}

	// 修改景区活动
	@Override
	public boolean updateJQactivity(JQActivity jqActivity) {
		return dao.updateJQactivity(jqActivity) > 0 ? true : false;
	}

	// 批量删除景区活动
	@Override
	public boolean deleteJQactivity(int[] jqActivitys) {
		return dao.deleteJQactivity(jqActivitys) > 0 ? true : false;
	}

//	新建景区活动时间
	@Override
	public boolean buildJQactivityTime(JQActivityTime jqActivityTime) {
		return dao.buildJQactivityTime(jqActivityTime) > 0 ? true : false;
	}

}
